<template>
  <page-header-wrapper>
    <a-card :bordered="false">
      <!--      <a-descriptions title="退款申请">-->
      <!--        <a-descriptions-item label="取货单号">1000000000</a-descriptions-item>-->
      <!--        <a-descriptions-item label="状态">已取货</a-descriptions-item>-->
      <!--        <a-descriptions-item label="销售单号">1234123421</a-descriptions-item>-->
      <!--        <a-descriptions-item label="子订单">3214321432</a-descriptions-item>-->
      <!--      </a-descriptions>-->
      <!--      <a-divider style="margin-bottom: 32px"/>-->
      <a-descriptions title="会员信息">
        <a-descriptions-item label="会员名称">{{ memInfo.nickname }}</a-descriptions-item>
        <a-descriptions-item label="会员等级">{{ memInfo.param.memLevelString }}</a-descriptions-item>
        <a-descriptions-item label="联系电话">{{ memInfo.mobile }}</a-descriptions-item>
        <a-descriptions-item label="性别">{{ memInfo.sex }}</a-descriptions-item>
        <a-descriptions-item label="会员账户余额">{{ memInfo.balance }}</a-descriptions-item>
        <a-descriptions-item label="会员总充值金额">{{ memInfo.totalRecharge }}</a-descriptions-item>
        <a-descriptions-item label="会员积分">{{ memInfo.points }}</a-descriptions-item>
        <a-descriptions-item label="会员账户状态">{{ memInfo.param.isDisabledString }}</a-descriptions-item>
        <a-descriptions-item label="会员签名">{{ memInfo.sign }}</a-descriptions-item>
      </a-descriptions>
      <a-divider style="margin-bottom: 32px" />

      <!--      <div class="title">充值记录</div>-->
      <!--      <s-table-->
      <!--        style="margin-bottom: 24px"-->
      <!--        row-key="id"-->
      <!--        :columns="columns"-->
      <!--        :data="loadGoodsData">-->

      <!--      </s-table>-->
    </a-card>
  </page-header-wrapper>
</template>

<script>
import { STable } from '@/components'
import memInfo from '@/api/memInfo'

export default {
  components: {
    STable
  },
  data () {
    return {
      id: null,
      memInfo: {}
    }
  },
  created () {
    this.id = this.$route.params.id
    this.init()
  },
  methods: {
    init () {
      memInfo.show(this.id).then(res => {
        console.log(res)
        this.memInfo = res.data
        console.log(this.memInfo)
      })
    }
  },
  filters: {
    statusFilter (status) {
      const statusMap = {
        'processing': '进行中',
        'success': '完成',
        'failed': '失败'
      }
      return statusMap[status]
    }
  },
  computed: {
    title () {
      return this.$route.meta.title
    }
  }

}
</script>

<style lang="less" scoped>
.title {
  color: rgba(0, 0, 0, .85);
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 16px;
}
</style>
